<html><head>
    <title>Local Page</title>

    <meta charset="utf-8">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
    body 
    {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;    
    }
    
    div 
    {
        width: 500px;
        margin: 0.5em auto;
        padding: 100px;
        background-color: #fff;
        border-radius: 1em;
        border:1px solid #27AE60;
    }
    button
    {
		width: 200px ;
		height: 50px; 
		 border:10px 
    }

    a:link, a:visited {
        color: #27AE60;
        text-decoration: none;
    }
    @media (max-width: 250px) {
        body {
            background-color: #fff;
        }
        div {
            width: auto;
            margin: 0 auto;
            border-radius: 0;
            padding: 1em;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>Unity命令测试</h1>
    <button onclick="Close()">Close</button> 
    <br><br>
    <button onclick="ReqWifi()">Wifi</button> 
    <br><br>
    <button onclick="ReqParams()">Params</button> 
    <br><br>
    <br><br>
	<a href="https://www.douyu.com/">斗鱼直播</a>
    <br><br>
    <br><br>
	<a href="http://pvp.qq.com/ingame/all/matchCenter/index.shtml?partition=2048&roleid=1709672837&area=2&#!/">王者荣耀</a>
</div>

<script type="text/javascript">
	function Close()
	{
		SendCmdToUnity("uniwebview://cmd_closeview" )
	}

	function ReqWifi()
	{
		SendCmdToUnity("uniwebview://cmd_isWifi")
	}

	function ReqParams()
	{
		SendCmdToUnity("uniwebview://cmd_params")
	}

	function SendCmdToUnity(cmd)
	{
		window.location.href = cmd
	}

	function OnReceivedMessageFromUnity(cmd , json)
	{
		alert( cmd + "___" +  JSON.stringify(json)) 
	}
</script>

</body></html>
